package com.huibo.shopping.product;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import com.huibo.shopping.util.AjaxResult;

@RestController
public class ProductController {

	@GetMapping("/getAjax")
	public AjaxResult getAjax() {
		try {
			Product p = new Product();
			p.setId(1L);
			p.setName("鞋子");
			p.setSubName("supreme");
			return AjaxResult.getInstance().setMsg("查询成功");
		}catch (Exception e) {
			// TODO: handle exception
			e.printStackTrace();
			return AjaxResult.getInstance().setMsg("查询失败");
		}
	}
}
